#ifndef __EFFECT3DMANAGER_H__
#define __EFFECT3DMANAGER_H__
/////////////////
//include
/////////////////
#include"Device.h"
#include"DeviceContext.h"
#include"../Effekseer/Effekseer.h"
#include"../Effekseer/EffekseerRendererDX11.h"
#include"../Effekseer/EffekseerSoundXAudio2.h"
#include<map>
/////////////////
//const
/////////////////
const int MAX_EFFECT_COUNT = 2000;
/////////////////
//class
/////////////////
class Camera;
struct Effect3D
{
	Effect3D(Effekseer::Handle effect = Effekseer::Handle(),	Effekseer::Vector3D pos = Effekseer::Vector3D())
	{
		this->effect	= effect;
		this->pos		= pos;
	}
	void SetPos(Vector3D pos)
	{
		this->pos.X = pos.x;
		this->pos.Y = pos.y;
		this->pos.Z = pos.z;
	}
	Effekseer::Handle GetHandle() const {return effect;}
private:
	Effekseer::Handle effect;
	Effekseer::Vector3D pos;
};
class Effect3DManager
{
public:
	Effect3DManager(Device* device = NULL,DeviceContext* device_context = NULL,Camera* camera = NULL);
	~Effect3DManager();

	static	void Init();
	static	void ContentLoad(Device* device);
	static	void Update();
	static	void Draw(DeviceContext* device);
	static	void Load3dEffect(int index,std::wstring file_name);
	static	void SetEffect(int index,Vector3D pos);
	static	Effekseer::Matrix44 GetMat(const Matrix& mat);
private:
	static	Effekseer::Manager*				manager;
	static	EffekseerRenderer::Renderer*	renderer;
	static	EffekseerSound::Sound*			sound;
	static	Camera*							camera;
	static	Array<Effekseer::Effect*> effect_infos;
	static	Array<Effect3D*> effects;
	
};
#endif __EFFECT3DMANAGER_H__
